//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package project_entry_dao

import "go.mongodb.org/mongo-driver/mongo"

var EntryDao *_EntryDao
var FolderDao *_FolderDao
var EntryRecycleDao *_EntryRecycleDao

func InitDao(mgoDb *mongo.Database) (err error) {
	EntryDao, err = newEntryDao(mgoDb)
	if err != nil {
		return
	}
	FolderDao, err = newFolderDao(mgoDb)
	if err != nil {
		return
	}
	EntryRecycleDao, err = newEntryRecycleDao(mgoDb)
	if err != nil {
		return
	}
	return
}
